<?php
App::uses('AppModel', 'Model');
/**
 * Questionnaire Model
 *
 * @property resource $resource
 * @property question $question
 */
class Questionnaire extends AppModel {

/**
 * Primary key field
 *
 * @var string
 */
	public $primaryKey = 'q_id';


public $validate = array(
        
        'qName' => array( 
            'input_questionnaire' => array( 
            'rule' => array('notempty'), 
            'message' => 'Please enter a questionnaire'), 
       ),
       );

/**
 * Display field
 *
 * @var string
 */
	public $displayField = 'qName';


	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * belongsTo associations
 *
 * @var array
 */
	public $hasOne = array(
		'resource' => array(
			'className' => 'Resource',
			'foreignKey' => 'q_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * hasMany associations
 *
 * @var array
 */
	public $hasMany = array(
		'Question' => array(
			'className' => 'Question',
			'foreignKey' => 'q_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
